<?php

namespace App\Models;

use App\Helpers\BaseModel;
use App\Helpers\RequestCriteria;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ESClusterChargeLog extends Model
{
    use HasFactory, RequestCriteria, BaseModel;
    protected $fillable = [
        'begin_at',
        'end_at',
        'power',
        'state',  
        'remarks',
        'e_s_cluster_id',

    ];

    protected $casts = [
        'updated_at' => 'datetime:Y-m-d H:i:s',
        'created_at' => 'datetime:Y-m-d H:i:s',
    ];

    public function esCluster()
    {
        return $this->belongsTo(ESCluster::Class);
    }
}
